<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="?attr/background_color_primary"
    android:orientation="vertical"
    tools:context=".ui.search.fragment.SearchFragment">

    <LinearLayout
        style="@style/header_layout"
        android:layout_marginBottom="@dimen/margin_8dp">

        <TextView
            style="@style/header_text"
            android:text="@string/search_text" />
    </LinearLayout>

    <LinearLayout style="@style/search_layout">

        <ImageView
            style="@style/search_layout_icons.start"
            android:src="@drawable/search_icon_light_small" />

        <EditText
            android:id="@+id/queryInput"
            style="@style/search_layout_input"
            android:hint="@string/search_text"
            android:imeOptions="actionDone"
            android:singleLine="true" />

        <ImageView
            android:id="@+id/clearIcon"
            style="@style/search_layout_icons.end"
            android:src="@drawable/clear_button_light_small"
            android:visibility="gone" />
    </LinearLayout>

    <LinearLayout
        android:id="@+id/searchHistoryLayout"
        style="@style/placeholder_layout"
        android:layout_marginTop="32dp">

        <TextView
            android:text="@string/search_history_message"
            style="@style/search_history_message" />

        <androidx.recyclerview.widget.RecyclerView
            android:id="@+id/searchHistoryList"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:paddingBottom="48dp"/>

        <Button
            android:id="@+id/clearHistoryButton"
            style="@style/button_refresh"
            android:layout_marginTop="-48dp"
            android:text="@string/clear_history" />
    </LinearLayout>


    <LinearLayout
        android:id="@+id/placeholderLayout"
        style="@style/placeholder_layout">

        <ImageView
            android:id="@+id/placeholderImage"
            style="@style/placeholder_image"></ImageView>

        <TextView
            android:id="@+id/placeholderMessage"
            style="@style/placeholder_text" />

        <Button
            android:id="@+id/refreshButton"
            style="@style/button_refresh"
            android:text="@string/refresh"/>
    </LinearLayout>

    <ProgressBar android:id="@+id/progressBar"
        android:layout_width="44dp"
        android:layout_height="44dp"
        android:layout_marginTop="140dp"
        android:layout_gravity="center"
        android:indeterminateTint="@color/YP_Blue"
        android:visibility="gone"/>

    <androidx.recyclerview.widget.RecyclerView
        android:id="@+id/trackList"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="16dp" />

</LinearLayout>